﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace GenUI.WPF.GenControls
{
    public class TextBoxHelper
    {
        public static string GetTitle(DependencyObject obj)
        {
            return (string)obj.GetValue(TitleProperty);
        }
        public static void SetTitle(DependencyObject obj, string value)
        {
            obj.SetValue(TitleProperty, value);
        }

        // Using a DependencyProperty as the backing store for Title.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty TitleProperty =
            DependencyProperty.RegisterAttached("Title", typeof(string), typeof(TextBoxHelper),new PropertyMetadata("Title"));

        public static double GetTitleWidth(DependencyObject obj)
        {
            return (double)obj.GetValue(TitleWidthProperty);
        }

        public static void SetTitleWidth(DependencyObject obj, double value)
        {
            obj.SetValue(TitleWidthProperty, value);
        }
        // Using a DependencyProperty as the backing store for TitleWidth.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty TitleWidthProperty =
            DependencyProperty.RegisterAttached("TitleWidth", typeof(double), typeof(TextBoxHelper),new PropertyMetadata(0d));

    }
}
